<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcss.com/redux/4.0.0/redux.js"></script>
    <title>Document</title>
</head>
<body>
    <div>-</div>
    <div>0</div>
    <div>+</div>
</body>
    <script>
        // 定义reducer函数
        function reducer(state = {count: 0}, action) {
            if(action.type === 'INCREMENT') {
                return {count: state.count + 1}
            }
            if (action.type === 'DECREMENT') {
                return { count: state.count - 1 }
            }
        }
    </script>
</html>